<?php
/**
 * Created by PhpStorm.
 * User: User
 * Date: 2017/12/11
 * Time: 9:56
 */

namespace Test;


class TestSum
{

    protected $d = '';

    public function sum(...$num)
    {
        $this->d = array_sum($num);
        return $this;
    }

    public function abs(){
        $this->d = abs($this->d);
        return $this;
    }

    public function printResult()
    {
        echo $this->d;
    }

}